<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="d"></div>
<script>
    const d = document.getElementById('d');

    const s = new Set();
    s.add(1).add(2).add(3);

    s.forEach((v, k, s) => {
        console.log(v, k, s);
        console.log(this);
    }, d);
</script>
</body>
</html>